home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / c / datelib.exe / BB_TAG_S.C < prev    next >
C/C++ Source or Header  |  1992-03-27  |  731b  |  35 lines

  1. static char bbt_prg[] = "@(#)char *bb_tag_s(int jjjj) - Bu▀- u. Bettag ermitteln";
  2. static char bbt_ver[] = "@(#)v1.00/kr ; 07.11.91";
  3. /* pfingsten_s   Ermittlung des Datums fⁿr den Bu▀- und Bettag.
  4. */
  5.  
  6. #include <stdio.h>
  7. #include "datum.h"
  8.  
  9. #ifdef __TURBOC__
  10. char *bb_tag_s(int jjjj)
  11. #else
  12. char *bb_tag_s(jjjj)
  13. int jjjj;
  14. #endif
  15. {
  16.     int  diff_4adv = 0;
  17.     char bb_tag[11];
  18.     char weihnachten[11];
  19.  
  20.     bb_tag[0]      =
  21.     weihnachten[0] = '\0';
  22.  
  23.     strcpy(weihnachten,"24.12.");
  24.     itoa(jjjj,&weihnachten[6]);
  25.     weihnachten[10] = '\0';
  26.     diff_4adv = weekday_s(weihnachten);
  27.  
  28.     if (diff_4adv == 7) diff_4adv = 0;
  29.  
  30.     calcdate(weihnachten,(long)(-diff_4adv - 32),bb_tag);
  31.  
  32.     return(bb_tag);
  33. } /* ENDE: bb_tag_s() */
  34.  
  35.